package com.niiwoo.civet.mobile.vo.request.myloan;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @Author: wuke
 * @Description:
 * @Date: Created in 11:16 2018/3/26
 */
@Data
@ApiModel(value = "借款凭证提交请求")
public class LoanVoucherSubmitRequestVO {
    @NotNull
    @Min(value = 1)
    @ApiModelProperty(value = "标的ID",  required = true)
    private Long projectId;

    @Size(max = 100,message = "用款说明不能超过100字")
    @ApiModelProperty(value = "用款说明")
    private String loanDesc;

    @Valid
    @Size(min = 1,max = 5,message = "借款凭证图片数量限制为1至5张")
    @ApiModelProperty(value = "借款凭证图片信息")
    private List<LoanVoucherImgRequestVO> loanVoucherImgList;

    @Data
    public static class LoanVoucherImgRequestVO{
        @NotNull
        @ApiModelProperty(value = "图片地址",  required = true)
        private String imgUrl;

        @NotNull
        @ApiModelProperty(value = "图片缩略地址",  required = true)
        private String imgThumbnailUrl;
    }
}
